import { requestClient } from '#/api/request';

/**
 * 获取用户列表
 */
export async function getUserList(params: {
  Username: string;
  size: number;
  page: number;
}) {
  return requestClient.get('/user/list', {
    params,
  });
}

/**
 * 添加用户
 */
export async function addUser(data: any) {
  return requestClient.post('/register', data);
}

/***
 * 修改用户
 */
export async function updateUser(data: any) {
  return requestClient.put('/user/' + data.id, data);
}
/***
 * 删除用户
 */
export async function deleteUser(id: any) {
  return requestClient.delete('/user/' + id);
}
